/**
 * 
 */
package org.cuatrovientos.vectorexample;

import java.util.Vector;

/**
 * @author PC
 *
 */
public class VectorExample {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Vector<String> books = new Vector<String>();

		
		books.add("Neji");
		books.add("Hinata");
		books.add("Tsunade");
		
		//System.out.println(books.elementAt(1));
		//books.set(0, "Jiraiya");
		//System.out.println(books.elementAt(0));
		
		for (int i = 0; i < books.size();i++){
			System.out.println(books.elementAt(i));
		}
		
		for (String book: books) {
		System.out.println(book);
		}
		
		Vector<Book> myBooks = new Vector<Book>();
		Book oneBook = new Book ("Hobbit","Kakashi");
			Book otherBook = new Book ("Orochimaru","Sasuke");
			myBooks.add(oneBook);
			myBooks.add(otherBook);
			
			for (Book boo: myBooks) {
				System.out.println(boo.toString());
			}
	}
}
